<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
		<!-- top picture -->
		<div class="topPic">
			<img src="img/top11.jpg" style="height:50px"><img src="img/top11.jpg" style="height:50px"><img src="img/top11.jpg" style="height:50px"><img src="img/top11.jpg" style="height:50px"><img src="img/top111.jpg" style="height:50px">
		</div>
		<!-- top -->
		<div class="top" style="border-bottom:1px double #AEAEAE;margin-bottom:5px;">
			<div class="part1" style="margin-bottom:10px;">
				<span style="margin-left:10px;">
				<c:choose>
		      	  <c:when test="${not empty sessionScope.curr_user}">
			      	<a href="/userCenter.action">
				      	${sessionScope.curr_user.username}
					</a>，
		      	  </c:when>
		      	  <c:otherwise>
		      		
		      	  </c:otherwise>
		        </c:choose>
				欢迎来到pig书屋！</span>
				<!-- 菜单 -->
				<div class="btn-group" style="margin-left:330px;">
				  <a class="btn" href="/home.action"><i class="icon-home"></i>首页</a>
				  <c:choose>
		      	    <c:when test="${not empty sessionScope.curr_user}">
			      		<a class="btn disabled" href="javascript:;"><i class="icon-circle-arrow-right"></i>登录</a>	  
		      	    </c:when>
		      	    <c:otherwise>
		      			<a class="btn" href="/login.action"><i class="icon-circle-arrow-right"></i>登录</a>
		      	    </c:otherwise>
		          </c:choose>
				  <!-- <a class="btn" href="/login.action"><i class="icon-circle-arrow-right"></i>登录</a> -->
				  <a class="btn" href="/reg.action"><i class="icon-plus"></i>注册</a>
				  <a class="btn" href="/intoMyFav.action"><i class="icon-heart"></i>收藏夹</a>
				  <a class="btn" href="/intoMyShopcar.action"><i class="icon-shopping-cart"></i>购物车</a>
				  <div class="btn-group">
				    <button class="btn dropdown-toggle" data-toggle="dropdown">
				      <i class="icon-user"></i><!-- 张三 -->
				      <c:choose>
				      	<c:when test="${not empty sessionScope.curr_user}">
					      	${sessionScope.curr_user.username}
				      	</c:when>
				      	<c:otherwise>
				      		未登录
				      	</c:otherwise>
				      </c:choose>
				      <span class="caret"></span>
				    </button>
				    <c:choose>
					    <c:when test="${not empty sessionScope.curr_user}">
					      	<ul class="dropdown-menu pull-right">
						      <li><a href="/userCenter.action">个人中心</a></li>
						      <li><a href="/logout.action">安全退出</a></li>
						    </ul>
				      	</c:when>
				      	<c:otherwise>
				      	</c:otherwise>
			      	</c:choose>
				   <!--  <ul class="dropdown-menu pull-right">
				      <li><a href="/userCenter.action">个人中心</a></li>
				      <li><a href="/logout.action">安全退出</a></li>
				    </ul> -->
				  </div>
				</div>
			</div>
			<div class="part2">
				<img src="img/logo2.png" style="width:120px;height:55px;margin:3px 3px 3px 10px">
				<!-- 搜索 -->
				<form class="form-search" style="display:inline;margin-left:30px;" method="post" action="/souBook.action">
				  <div class="input-prepend input-append">
					  <span class="add-on" style="padding:6px;"><i class="icon-search"></i>搜索</span>
					  <input class="span5" id="appendedPrependedInput" placeholder="请输入书名关键字" type="text" style="padding:6px;" name="sou">
					  <button class="btn" type="submit" style="padding:6px;" >Go!</button>
					</div>
				</form>
			</div>			
		</div>